package com.wing.cabinet.model.response;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wing.cabinet.model.entity.CheckedInventoryInout;

/**
 * 暂存柜存刀/取刀;存/取维修/回收刀盘验VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class CheckedInventoryInoutVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 存刀任务编号
     */
    private String code;

    /**
     * no
     */
    private Integer no;

    /**
     * day
     */
    private Integer day;

    /**
     * 操作类型
     */
    private CheckedInventoryInout.OperationType operationType;

    /**
    * 操作类型描述
    */
    @TableField(exist = false)
    private String operationTypeDesc;

    public String getOperationTypeDesc() {
        return operationType.getDesc();
    }

    /**
     * 业务类型
     */
    private CheckedInventoryInout.BusinessType businessType;

    /**
    * 业务类型描述
    */
    @TableField(exist = false)
    private String businessTypeDesc;

    public String getBusinessTypeDesc() {
        return businessType.getDesc();
    }

    /**
     * 状态
     */
    private CheckedInventoryInout.Status status;

    /**
    * 状态描述
    */
    @TableField(exist = false)
    private String statusDesc;

    public String getStatusDesc() {
        return status.getDesc();
    }

    /**
     * 盘验时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime checkTime;

    /**
     * 盘验人id
     */
    private Long checkUserId;

    /**
     * 盘验人
     */
    private String checkUserName;

    /**
     * 通知时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime notifyTime;

    /**
     * 通知人
     */
    private Long notifyUserId;

    /**
     * 通知人
     */
    private String notifyUserName;

    /**
     * 回收人id
     */
    private Long takeUserId;

    /**
     * 回收人
     */
    private String takeUserName;

    /**
     * 回收时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime takeTime;

    /**
     * 盘验id
     */
    private Long storageInoutId;


    private Long checkedResultId;

    private CheckedInventoryInout.BusinessTypePre businessTypePre;


    private String businessTypePreDesc;

    public String getBusinessTypePreDesc(){
        if (businessTypePre!=null){
            return businessTypePre.getDesc();
        }
        return "";
    }

    /**
     * 企业编码
     */
    private String enterpriseCode;

}
